<!--_meta 作为公共模版分离出去-->
<include file='Index/meta'/>
<!--/meta 作为公共模版分离出去-->

<title>客服列表</title>
<style>
    .tupian{ width:40px; height:auto; vertical-align:middle;}
    .huise{ color:#CCCCCC; font-size:11px; margin-left:50px;}
</style>
</head>
<body>
<!--_header 作为公共模版分离出去-->
<include file='Index/header'/>
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
<include file='Index/leftmenu' />
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 客服 <span class="c-gray en">&gt;</span> 客服列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-20">

            <div class="mt-0">
                <table class="table table-border table-bordered table-bg table-hover table-sort" width="100%">
                    <thead>
                    <tr class="text-c">
                        <th width="200">用户</th>
                        <th width="150">消息</th>
                        <th width="60">回复</th>
                    </tr>
                    </thead>
                    {volist name="data" id="v"}
                        <tr class="text-c">
                            <th width="20%">{:getname($v.uid)}</th>
                            <th width="60%"><img src="__IMG__message.png" class="tupian"/>：{$v.shuju.content}
                                <if condition="$v.weidu neq 0">
								<span class="huise">
								你有<a style="color: #FF0000;" href="{:url('screen', ['uid' => $v.uid])}" target="_blank">{$v.weidu}</a>条未读消息
								</span>


                                </if>
                                <span class="huise">
                                    {:date('Y-m-d H:i:s', $v.shuju.create_time)}
								</span>
                            </th>
                            <th width="20%"><a href="{:url('screen',['uid' => $v.uid])}" target="_blank">点击回复</a></th>
                        </tr>
                    {/volist}

                </table>
            </div>
        </article>
    </div>
    <div >
        <div style="display: none;"  id="yuyin">
            <!-- <audio controls="controls"  autoplay="autoplay">
              <source src="http://gddx.sc.chinaz.com/Files/DownLoad/sound1/201607/7499.mp3" type="audio/ogg" />
            </audio> -->

        </div>

</section>

<!--_footer 作为公共模版分离出去-->
<include file='Index/footer'/>
<!--/_footer /作为公共模版分离出去-->

<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
{load href="__JS__jquery.min.js"}
<script>
    setInterval(function() {
        window.location.reload();
    },10000)


    var n="{$zweidu}" ;
    var titleInit = document.title;
    if(n>0){
        var titleInit = document.title, isShine = true;
    }
    setInterval(function() {
        var title = document.title;
        if (isShine == true) {
            if (/新/.test(title) == false) {
                document.title = '【你有'+n+'新消息】';
            } else {
                document.title = '【　　　　　】';
            }
        } else {
            document.title = titleInit;
        }
    }, 500);

    window.onfocus = function() {
        isShine = false;
    };
    window.onblur = function() {
        isShine = true;
    };

    // for IE
    document.onfocusin = function() {
        isShine = false;
    };
    document.onfocusout = function() {
        isShine = true;
    };



    setInterval(function(){
        $.ajax({
            type:'POST',
            url:"http://www.youdingb.com/hongzhunxing/index.php/Home/Orders/dingdanshu",
            data:{user_id:1},
            dataType:"json",
            success:function(data){
                // alert(data.result);
                if(data.result>0)
                {
                    var html='<audio controls="controls"autoplay="autoplay"><source src="http://gddx.sc.chinaz.com/Files/DownLoad/sound1/201607/7499.mp3" type="audio/ogg" /></audio>';
                    $('#yuyin').html(html);
                    // window.location.reload();
                }

                else
                {
                    var html="";
                    $('#yuyin').html(html);

                }
                //加载数据
                // onGetMessage();

            }
        })


    },4000)

    function bofang()

    {


    }


</script>